package com.frxuexi.park2302.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.alibaba.android.arouter.launcher.ARouter
import com.blankj.utilcode.util.SPUtils
import com.frxuexi.lib_base.http.Const
import com.frxuexi.lib_base.mvi.BaseViewFragment
import com.frxuexi.park2302.R
import com.frxuexi.park2302.databinding.FragmentMyBinding

class MyFragment : BaseViewFragment<FragmentMyBinding>() {
    override val binding: FragmentMyBinding by lazy { FragmentMyBinding.inflate(layoutInflater) }

    override fun initView() {
        binding.mychange.setOnClickListener {
            SPUtils.getInstance().apply {
                remove(Const.ROLE)
                remove(Const.UID)
                remove(Const.UNAME)
                remove(Const.TOKEN)
            }
            ARouter.getInstance().build("/app/LoginActivity").navigation()
        }

        binding.myfavIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyApplyActivity").navigation()
        }

        binding.mymenIv.setOnClickListener {
            ARouter.getInstance().build("/app/MyApproveActivity").navigation()
        }

        binding.mybill.setOnClickListener {
            ARouter.getInstance().build("/shop/OrderActivity").navigation()
        }
    }

}